import BaseEntity from './BaseEntity.mjs'

/**
 * 本地作者
 */
export default class LocalAuthor extends BaseEntity {
  /**
   * 作者名称
   * @type {string | undefined | null}
   */
  authorName
  /**
   * 最后一次使用的时间
   * @type {number | null | undefined}
   */
  lastUse

  /**
   * @param localAuthor : LocalAuthor
   */
  constructor(localAuthor) {
    super(localAuthor)
    if (localAuthor === undefined) {
      this.authorName = undefined
      this.lastUse = undefined
    } else {
      this.authorName = localAuthor.authorName
      this.lastUse = localAuthor.lastUse
    }
  }
}
